import { RouteRecordRaw } from "vue-router"
import Layout from "@/views/layouts/index.vue"

export const routes: Array<RouteRecordRaw> = [
  {
    path:'/',
    name:'Home',
    redirect:'./home',
    meta:{
      title:'首页',
      keepAlive:false
    },
    component:Layout,
    children:[
      {
        path:'/home',
        name:'Home',
        component:() =>import('@/views/tabBar/Home.vue'),
        meta:{ title:'首页', keepAlive: false, showTab:true }
      },
      {
        path:'/demo',
        name:'Demo',
        component:() =>import('@/views/tabBar/Demo.vue'),
        meta:{ title:'测试案例', keepAlive: false, showTab:true }
      },
      {
        path:'/pkgInfo',
        name:'PkgInfo',
        component:() =>import('@/views/tabBar/PkgInfo.vue'),
        meta:{ title:'项目信息', keepAlive: false, showTab:true }
      },
      {
        path:'/about',
        name:'About',
        component:() =>import('@/views/tabBar/About.vue'),
        meta:{ title:'关于我', keepAlive: false, showTab:true }
      },
      {
        path:'/pinia',
        name:'Pinia',
        component:() =>import('@/demo/testPinia.vue'),
        meta:{ title:'测试pinia', keepAlive: false, showTab:false }
      },
      {
        path:'/tsx',
        name:'Tsx',
        component:() =>import('@/demo/demo'), //导入路径不能以“.tsx”扩展名结束。考虑改为导入“@/demo/demo.js”
        meta:{ title:'测试tsx', keepAlive: false, showTab:false }
      },
      {
				path: '/static',
				name: 'Static',
				component: () => import('@/demo/testStatic.vue'),
				meta: { title: '测试静态资源', keepAlive: false, showTab: false }
			},
      {
				path: '/mockAxios',
				name: 'MockAxios',
				component: () => import('@/demo/testMockAxios.vue'),
				meta: { title: '测试mock-axios', keepAlive: false, showTab: false }
			},
      {
				path: '/testTimingData',
				name: 'TestTimingData',
				component: () => import('@/demo/testTimingData.vue'),
				meta: { title: '定时请求数据', keepAlive: false, showTab: false }
			},
      {
        path:'/storeGroup',
        name:'StoreGroup',
        component:() =>import('@/demo/testStoreGroup.vue'),
        meta:{ title:'测试pina进行状态组管理', keepAlive: false, showTab:false }
      },
      {
        path:'/permission',
        name:'Permission',
        component:() =>import('@/demo/testPermission.vue'),
        meta:{ title:'测试v-permission指令', keepAlive: false, showTab:false }
      },
      {
        path:'/slider',
        name:'Slider',
        component:() =>import('@/demo/testSlider.vue'),
        meta:{ title:'封装轮播图', keepAlive: false, showTab:false }
      },
    ]
  }
]